package com.aster.common.api.service;

import com.aster.common.base.BaseService;
import com.aster.common.exception.ServiceException;

/**
 * 
 * <br>
 * <b>功能：</b>TbAppTokenService<br>
 */
public interface AppTokenService extends BaseService {

    /**
     * 检查appToken是否过期
     * @param openId
     * @return
     */
    boolean overexpiredCheck(String openId) throws ServiceException;

    /**
     * 更新用户token和超时时间
     * @param openId
     * @return
     */
    String updateToken(String openId) throws ServiceException;

    /**
     * 根据token获取openId
     * @param token
     * @return
     * @throws ServiceException
     */
    String getOpenIdByToken(String token) throws ServiceException;
}
